﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SGTLightAccent.Models;
using GalaSoft.MvvmLight.Messaging;
using SGTLightAccent.ViewModel;

namespace SGTLightAccent.Views
{
    public partial class NuevaCargaWindow : ChildWindow
    {
        public NuevaCargaWindow(string titulo)
        {
            InitializeComponent();
            this.Title = titulo;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void dgBodegas_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
        {
            if (e.Column.DisplayIndex == 2)
            {
                EnvioMensaje msg = new EnvioMensaje("CantBodegas");
                Messenger.Default.Send<EnvioMensaje, MainViewModel>(msg);
            }
        }
    }
}

